<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.front.servlets.financial.UpdatePdd"%>
<%@page import="com.blockchain.front.servlets.financial.UpdatePd"%>
<%@page import="com.blockchain.front.servlets.financial.GdList"%>
<%@page import="com.blockchain.front.servlets.financial.UpdateGd"%>
<%@page import="com.blockchain.front.service.common.entity.GdEntity"%>
<%@page import="com.blockchain.front.service.financial.GdManage"%>
<%@page import="com.blockchain.common.enums.GdState"%>
<%@page import="com.blockchain.front.servlets.financial.Wygd"%>
<%@page import="com.blockchain.front.service.financial.entity.RechargeQrEntity"%>
<%@page import="com.blockchain.front.servlets.financial.Charge"%>
<%@page import="java.util.Random"%>
<%@page import="java.text.DecimalFormat"%>
<%@page import="com.blockchain.common.enums.ChargeStatus"%>
<%@page import="com.blockchain.common.enums.ChargeType"%>
<%@page import="com.blockchain.front.servlets.financial.CnyTx"%>
<%@page import="com.blockchain.front.service.financial.entity.TxRecordEntity"%>
<%@page import="com.blockchain.common.enums.WithdrawStatus"%>
<%@page import="com.blockchain.front.servlets.security.Bank"%>
<%@page import="com.blockchain.front.service.security.entity.BankCard"%>
<%@page import="com.blockchain.front.service.financial.entity.UserZhEntity"%>
<%@page import="com.blockchain.front.servlets.SendVice"%>
<%@page import="com.blockchain.front.servlets.Send"%>
<%@page import="com.blockchain.front.servlets.security.Qbbz"%>
<%@page import="com.blockchain.front.service.financial.entity.XlbEntity"%>
<%@page import="com.blockchain.util.http.URLParameter"%>
<%@page import="com.blockchain.front.servlets.financial.AbstractFinancialServlet"%>
<%@page import="com.blockchain.front.service.AbstractFrontService"%>
<%@page import="com.blockchain.front.servlets.AbstractFrontServlet"%>
<%@page import="com.blockchain.front.service.financial.entity.JlEntity"%>
<%@page import="com.blockchain.common.enums.JyztStatus"%>
<%@page import="com.blockchain.front.service.security.entity.QbdzEntity"%>
<%@page import="com.blockchain.front.service.security.SecurityManage"%>
<%@page import="com.blockchain.front.service.financial.FinancialManage"%>
<html>
<head>
<%
String str = languageDefine.getValue(request, "eurRecharge_eurRecharge");
String _TITLE_ = str + "- "+configureProvider.getProperty(SystemVariable.SITE_NAME);
CURRENT_SUB_CATEGORY="RMBJY";
PC_TITLE_NAME="RMBJY";
URLParameter parameter = new URLParameter(request,controller.getViewURI(request,Wygd.class));
GdState zt=EnumParser.parse(GdState.class, request.getParameter("zt"));
GdManage manage=serviceSession.getService(GdManage.class);
final String BOTTOM_PAGE = "bottom.page";
final int currentPage = IntegerParser.parse(request.getParameter(AbstractFrontServlet.PAGING_CURRENT));
final int bottomPage = IntegerParser.parse(request.getParameter(BOTTOM_PAGE));
PagingResult<GdEntity> ust=manage.getGdList(new Paging() {
	public int getCurrentPage() {
		return currentPage;
	}

	public int getSize() {
		return 10;
	}
}); //列表  
GdEntity[] us=ust.getItems(); //列表
 PagingResult<GdEntity> searchPd=manage.searchPd(new Paging() {
	public int getCurrentPage() {
		return bottomPage;
	}

	public int getSize() {
		return 6;
	}
});
 GdEntity[] search=searchPd.getItems(); //列表  
%> 
<title><%=_TITLE_ %></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
<%@include file="/WEB-INF/include/authenticatedSession.jsp"%>
</head>
<%@include file="/WEB-INF/include/header.jsp"%>
<div class="autobox">
    <div class="now">
         <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.Index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_home")%></a> &gt; <a href="<%=controller.getViewURI(request,com.blockchain.front.servlets.financial.index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_financeCenter")%> </a> &gt; <%=languageDefine.getValue(request, "eurRecharge_eurRecharge")%>
    </div>
    <div class="assets_center clear po_re zin70">
        <!--左侧菜单-->
        <div class="coin_menu">
    		<div class="coin_menu_box">
       		 	<ul>
            	<li id="finance_index"><i class="coin_menu_op_0_1"></i>我要挂单</li>
        		</ul>
    		</div>
			<%@include file="/WEB-INF/include/financial/left.jsp"%>	
		</div>
        <!--右侧内容-->
        <div class="assets_content w900 right bg_w">
            <div class="safe_center clear" style="padding-left: 0px;">
            <br>
            <div class="choosepaymethod">
                 <a href="<%=controller.getViewURI(request, GdList.class)%>" style="cursor:pointer;" class="wycz_cz active">挂单列表</a>
                 <a href="<%=controller.getViewURI(request, Wygd.class)%>" style="cursor:pointer;" class="wycz_cz"  id="outline">提交挂单</a>
                <div class="choosebanks"  id="JKDiv_1">
                    <div id="czxx" class="clearfix" style="padding-top:18px;display:block;" >
                    <div class="coin_list_top gdlist">
                    	<ul>
                        <li class="" >挂单数量</li>
                        <li class="" >单价</li>
                        <li class="" >剩余数量</li>
                        <li class="" >最小成交量</li>
                        <li class="" >支付方式</li>
                        <li class="" >联系电话</li>
                        <li class="" >挂单时间</li>
                        <li class="" >操作</li>
                    	</ul>
               		</div>
               		<form action="<%=controller.getViewURI(request, GdList.class)%>" method="post" id="form">
               		<ul class="coin_list" id="grid-finance" >
            <%if(us!=null){for(GdEntity u:us){%>
            	<li style="height:55px;">
            	<div class="gdlist" style="padding-left:29px;">
            		<dl style="width:100%;">
                  	  <dd class="" ><%=Formater.formatAmount(u.gdsl)%></dd>
                  	  <dd class="" ><%=Formater.formatAmount(u.gddj)%></dd>
                  	  <dd class="" ><%=Formater.formatAmount(u.sysl)%></dd>
                  	  <dd class="" ><%=Formater.formatAmount(u.zxcjsl)%></dd>
                  	  <dd class="" ><% StringHelper.filterHTML(out, u.zfType.getName());%></dd>
                      <dd class="" ><%StringHelper.filterHTML(out,u.lxdh);%></dd>
                      <dd class="" ><%=DateTimeParser.format(u.gdsj,"yyyy-MM-dd HH:mm")%></dd>
                      <dd class="" ><a style="margin-top:0px;" href="<%=controller.getURI(request, UpdatePd.class)%>?id=<%=u.id%>&type=-1">去拍单</a></dd>
                 </dl>
                 </div>
                 </li>
                <%}}%> 
            </ul>
            
            <%AbstractFinancialServlet.rendPagingResult(out, ust, BOTTOM_PAGE, bottomPage, AbstractFinancialServlet.PAGING_CURRENT);%>
       <%-- <%AbstractFinancialServlet.rendPagingResult(out, ust);%> --%>
       </form>
            </div>
                </div>
        </div>
                <div class="f_body">
                <form action="<%=controller.getViewURI(request, GdList.class)%>" method="post" id="form">
                    <table class="f_table" id="investLog_content">
                        <thead>
                        <tr>
                        	<th width="">流水号</th>
                        	<th width="">拍下时间</th>
                            <th width="">数量</th>
                            <th width="">单价</th>
                            <th width="">支付方式</th>
                            <th width="">收款账号</th>
                            <th width="">联系电话</th>
                            <th width="">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                  <%if(search!=null){for(GdEntity s:search){%> 
            <tr>
            	<td><%=s.id%></td>
                <td><%=DateTimeParser.format(s.pdsj,"yyyy-MM-dd HH:mm")%></td>
                <td><%=Formater.formatAmount(s.pdsl)%></td>
                <td><%=Formater.formatAmount(s.gddj)%></td>
                <td><%=backgroundDataFlag==2?s.zfType.getName():backgroundDataFlag==1?s.zfType.getNameEn():s.zfType.getNameTw()%></td>
                <%if(s.pdState == GdState.JYCG){%>
                <td>********</td>
                <td>********</td>
                <%} else {%>
                <td><%StringHelper.filterHTML(out, s.skzh);%></td>
                <td><%StringHelper.filterHTML(out, s.lxdh);%></td>
                <%} %>
                <%if(s.pdState == GdState.YPX){%>
                 <td><a href="<%=controller.getURI(request, UpdatePdd.class)%>?id=<%=s.pdid%>&type=1">取消拍单</a>&nbsp;<a href="<%=controller.getURI(request, UpdatePdd.class)%>?id=<%=s.pdid%>&type=2">已付款</a></td>
                <%}else if(s.pdState == GdState.YFK){%>
                <td><a href="<%=controller.getURI(request, UpdatePdd.class)%>?id=<%=s.pdid%>&type=1">申诉</a>
                 <%} else if(s.pdState == GdState.SSZ){%>
                <td><a href="<%=controller.getURI(request, UpdatePdd.class)%>?id=<%=s.pdid%>&type=1">
                 <%=backgroundDataFlag==2?s.pdState.getName():backgroundDataFlag==1?s.pdState.getNameEn():s.pdState.getNameTw()%></a>
                 <%} else {%>
                 <td><%=backgroundDataFlag==2?s.pdState.getName():backgroundDataFlag==1?s.pdState.getNameEn():s.pdState.getNameTw()%></td>
                 <%} %>
            </tr>
            <%}}%>
                  </tbody>
                    </table> 
                     <%AbstractFinancialServlet.rendPagingResult(out, searchPd, AbstractFinancialServlet.PAGING_CURRENT, currentPage, BOTTOM_PAGE);%> 
                     </form>
                 <%--  <%AbstractFinancialServlet.rendPaging(out, searchPd,controller.getPagingURI(request,Wygd.class),parameter.getQueryString());%> --%>
                </div>
    </div>
</div>
</div>
</div>

<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript">
 
	function Update() {
        $("#form").submit(); 
	  }
	   
<%String error = controller.getPrompt(request,response,PromptLevel.ERROR);if(!StringHelper.isEmpty(error)){%>
	layer.open({
	title: '<%=languageDefine.getValue(request, "js_tip")%>',
	content: '<%=languageDefine.getValue(request,error)%>'
});  
<%}%>

<%String info = controller.getPrompt(request,response,PromptLevel.INFO);if(!StringHelper.isEmpty(info)){%>
$("#dialog_ali").show();
$("#czxx").hide();
<%}%>

//隔行变色
function change_bg(id) {
    var oCoin_list = $('#' + id);
    var oC_li = oCoin_list.find('li');
    var oInp = oCoin_list.find('input');
    for (var i = 0; i < oC_li.length; i++) {
        oC_li.eq(i).css('background-color', i % 2 ? '#fff' : '#f8f8f8');
        oInp.mouseover(function() {
            this.style.color = '#fff';
            this.style.backgroundColor = '#e55600'
        });
        oInp.mouseout(function() {
            this.style.color = '#e55600';
            this.style.background = 'none'
        });
    }
}
function change_bg_1(id, tag, col1, col2) {
    var oCoin_list = $('#' + id);
    var oC_li = oCoin_list.find(tag);
    for (var i = 0; i < oC_li.length; i++)
        oC_li.eq(i).css('background-color', i % 2 ? col1 : col2);
}
//移入行变色
function change_line_bg(id, tag, nobg) {
    var oCoin_list = $('#' + id);
    var oC_li = oCoin_list.find(tag);
    var oInp = oCoin_list.find('a');
    var oldCol = null;
    var newCol = null;
    if (!nobg) {
        for (var i = 0; i < oC_li.length; i++) {
            oC_li.eq(i).css('background-color', i % 2 ? '#fff' : '#f8f8f8');
            oInp.mouseover(function() {
                this.style.color = '#fff';
                this.style.backgroundColor = '#0d66bf';
            });
            oInp.mouseout(function() {
                this.style.color = '#0d66bf';
                this.style.background = 'none';
            });
        }
    }
    oCoin_list.find(tag).hover(function() {
        oldCol = $(this).css('backgroundColor');
        $(this).css('background-color', '#f9f2dd');
    }, function() {
        $(this).css('background-color', oldCol);
    })
}
change_line_bg('grid-finance', 'li');
var rollSet = $('#widget');
var offset = rollSet.offset();
var fwidth = $("#footer").height();
$(window).scroll(
        function() {
            var scrollTop = $(window).scrollTop();
            var scrollBtm = $(document).height() - $(window).scrollTop()
                    - $("#widget").height();
            if (offset.top < scrollTop) {
                if (scrollBtm > fwidth) {
                    rollSet.removeClass('absolute').addClass('fixed')
                } else {
                    rollSet.removeClass('fixed').addClass('absolute')
                }
            } else {
                rollSet.removeClass('fixed')
            }
        });
</script>
</body>
</html>
	
